"""
進入爱逛卖家版
"""
import time

import yaml
from uiautomator2 import xpath

from page_object.guang_page import GuangPage
from page_object.login_page import LoginPage
from resource.path_info import *

"""
个人配置页面
"""
class SettingPage(GuangPage):

    def logout(self, d):
        print("logout")
        if d.xpath(logout_but_xpath).exists:
            d.xpath(logout_but_xpath).click()
            time.sleep(2)
            self.checkLogoutSuccess(d)
        return LoginPage()

    def checkLogoutSuccess(self,d):
        if d.xpath(login_phone_xpath).exists:
            print("logout successfully")
        else:
            raise Exception("logout fail!")

